package com.hzsoft.sys.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hzsoft.sys.entity.SysMenu;
import com.hzsoft.sys.mapper.SysMenuMapper;
import com.hzsoft.sys.service.SysMenuService;

@Transactional
@Service("sysMenuService")
public class SysMenuServiceImpl implements SysMenuService {

	private SysMenuMapper sysMenuMapper;

	public SysMenuMapper getSysMenuMapper() {
		return sysMenuMapper;
	}
	@Autowired
	public void setSysMenuMapper(SysMenuMapper sysMenuMapper) {
		this.sysMenuMapper = sysMenuMapper;
	}
	public int deleteByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return sysMenuMapper.deleteByPrimaryKey(id);
	}
	public int insert(SysMenu record) {
		// TODO Auto-generated method stub
		return sysMenuMapper.insert(record);
	}
	public int insertSelective(SysMenu record) {
		// TODO Auto-generated method stub
		return sysMenuMapper.insertSelective(record);
	}
	public SysMenu selectByPrimaryKey(Integer id) {
		// TODO Auto-generated method stub
		return sysMenuMapper.selectByPrimaryKey(id);
	}
	public int updateByPrimaryKeySelective(SysMenu record) {
		// TODO Auto-generated method stub
		return sysMenuMapper.updateByPrimaryKeySelective(record);
	}
	public int updateByPrimaryKey(SysMenu record) {
		// TODO Auto-generated method stub
		return sysMenuMapper.updateByPrimaryKey(record);
	}
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public List<SysMenu> listPageMenu(SysMenu menu) {
		// TODO Auto-generated method stub
		return sysMenuMapper.listPageMenu(menu);
	}
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public List<SysMenu> listMenus(String userId) {
		// TODO Auto-generated method stub
		return sysMenuMapper.listMenus(userId);
	}
	
	public int deleteAll(SysMenu menu) {
		// TODO Auto-generated method stub
		return sysMenuMapper.deleteAll(menu);
	}
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public List<SysMenu> selectAllMenu() {
		// TODO Auto-generated method stub
		return sysMenuMapper.selectAllMenu();
	}

}
